﻿using System;

using Fuse8.DomainFramework.Domain;

using Fuse8.ContentManagementFramework.Domain.Commands.CommandParameters;

namespace Fuse8.ContentManagementFramework.Domain.Commands
{
    public abstract class CmsPageSelectAllCommand : BaseEntityParameterCommand<CmsPage, CmsPageSelectAllCommandParameter>
    {
        public override string CacheKey
        {
            get
            {
                return string.Format("SiteGroup_{0};Site_{1};SystemLanguage_{2};Level_{3}",
                    CommandParameter.SiteGroupId.GetValueOrDefault(0),
                    CommandParameter.SiteId.GetValueOrDefault(0),
                    CommandParameter.SystemLanguageId.GetValueOrDefault(0),
                    CommandParameter.PageLevel.HasValue ? CommandParameter.PageLevel.ToString() : "All");
            }
        }

        public override string CommandName
        {
            get
            {
                return "CmsPageSelectAllCommand";
            }
        }
    }
}
